/*
 * @Author: Mark
 * @Date: 2018-09-19 12:45:09
 * @LastEditors: Mark
 * @LastEditTime: 2018-09-20 09:39:20
 * @Description: 
 */
import myChart from "@/components/myChart/MyChart";
export default {

  data() {
    return {
      webServer: '',
      chart: {
        sourceWebChart: {}
      }
    };
  },
  mounted() {
    this.initChart()
  },

  methods: {
    initChart() {
      let vue = this
      vue.chart.sourceWebChart = vue.$echarts.init(document.getElementById('source-web-chart'))

      var option = [{
        "name": "m.facebook.com",
        "value": 100
      },
      {
        "name": "www.simpleapche.com",
        "value": 88
      },
      {
        "name": "www.google.com",
        "value": 70
      },
      {
        "name": "simpleapacheshi.com",
        "value": 65
      },
      {
        "name": "www.facebook.com",
        "value": 55
      },
      {
        "name": "www.baidu.com",
        "value": 54
      },
      {
        "name": "www.rjt.com",
        "value": 33
      },
      {
        "name": "org.chinasoft.com",
        "value": 28
      },
      {
        "name": "www.sbt.com",
        "value": 22
      },
      {
        "name": "其他",
        "value": 21
      }
      ]

      let optionvalue= myChart.getPieRoseOption([])

      vue.chart.sourceWebChart.setOption(optionvalue)
    }

  }
}